Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Presences to Users #616

Closed
wants to merge 1 commit into from
Closed

Rename Presences to Users #616

wants to merge 1 commit into from

Conversation

chacha912
Copy link
Contributor

What this PR does / why we need it:

Rename doc.getPresences() to doc.getUsers() as the returned value aligns more closely with user information, making this name easier to comprehend.

The reason users is used in getUsers is that using clients (as yorkie Client) might imply that it should hold all information about the yorkie client. However, users only contain clientID and presence information, so I used the term users instead of clients.

Which issue(s) this PR fixes:

Related #609
yorkie-team/yorkie-js-sdk#618

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #616 (b2a5601) into main (cf74a80) will not change coverage.
The diff coverage is 40.00%.

@@           Coverage Diff           @@
##             main     #616   +/-   ##
=======================================
  Coverage   50.23%   50.23%           
=======================================
  Files          69       69           
  Lines        7305     7305           
=======================================
  Hits         3670     3670           
  Misses       3145     3145           
  Partials      490      490           
Files Changed Coverage Δ
pkg/document/document.go 44.55% <0.00%> (ø)
pkg/document/internal_document.go 13.67% <ø> (ø)
server/rpc/admin_server.go 53.97% <0.00%> (ø)
server/backend/database/memory/database.go 50.28% <100.00%> (ø)
server/backend/database/mongo/client.go 41.96% <100.00%> (ø)

@hackerwins
Copy link
Member

I think the term "getUsers" isn't the best choice, considering that a single user might be using multiple clients. Additionally, the SDK hasn't introduced the concept of a user just yet.

Will Presence be confused?

@hackerwins hackerwins added the discussion 💭 Need to be discussed label Aug 18, 2023
@chacha912
Copy link
Contributor Author

@hackerwins I think that presence's' wasn't clear. In the js-sdk, getPresences() returns an array of { clientID: ActorID; presence: P }, which feels closer to a user. However, I agree that this needs more discussion since it's the first time expressing the concept of a user.
image

@hackerwins
Copy link
Member

I will close this PR for now. Please let me know when you proceed.

@hackerwins hackerwins closed this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion 💭 Need to be discussed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants